//package edu.njust.cma.config;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
//@Configuration
//public class WebConfig implements WebMvcConfigurer {
//    //注入拦截器
//    @Autowired
//    private LoginCheckInterceptor loginCheckInterceptor;
//
//    public void addInterceptors(InterceptorRegistry registry) {
//        //注册拦截器
//        registry.addInterceptor(loginCheckInterceptor)
//                .addPathPatterns("/**") //拦截所有请求
//                .excludePathPatterns("/register"); //放行注册请求
//    }
//}
